import { defineStore } from 'pinia';
import { FriendItem } from './types';

const useFriendStore = defineStore('friend', {
  state: (): FriendItem => ({
    friendwxid: '', // 当前选中的群id
    friendnick: '',
    avatarMinUrl: '',
    avatarMaxUrl: '',
    isopenai: false,
    isconfirmpay: false,
    remark: '',
  }),

  getters: {
    
  },

  actions: {    
    selectedFriend(friendwxid: string, avatarMaxUrl: string, friendnick: string,remark:string, isopenai: boolean, isconfirmpay: boolean) {
      this.friendwxid = friendwxid;
      this.avatarMaxUrl = avatarMaxUrl;
      this.friendnick = friendnick;      
      this.remark = remark;
      this.isopenai = isopenai;
      this.isconfirmpay = isconfirmpay;
    },
  },
});

export default useFriendStore;